import 'package:chat_app_project/generated/json/base/json_convert_content.dart';
import 'package:chat_app_project/models/page_info_entity.dart';

PageInfoEntity $PageInfoEntityFromJson(Map<String, dynamic> json) {
	final PageInfoEntity pageInfoEntity = PageInfoEntity();
	final dynamic list = jsonConvert.convert<dynamic>(json['list']);
	if (list != null) {
		pageInfoEntity.list = list;
	}
	final bool? next = jsonConvert.convert<bool>(json['next']);
	if (next != null) {
		pageInfoEntity.next = next;
	}
	final int? page = jsonConvert.convert<int>(json['page']);
	if (page != null) {
		pageInfoEntity.page = page;
	}
	final int? pageSize = jsonConvert.convert<int>(json['pageSize']);
	if (pageSize != null) {
		pageInfoEntity.pageSize = pageSize;
	}
	final int? total = jsonConvert.convert<int>(json['total']);
	if (total != null) {
		pageInfoEntity.total = total;
	}
	final int? totalPage = jsonConvert.convert<int>(json['totalPage']);
	if (totalPage != null) {
		pageInfoEntity.totalPage = totalPage;
	}
	return pageInfoEntity;
}

Map<String, dynamic> $PageInfoEntityToJson(PageInfoEntity entity) {
	final Map<String, dynamic> data = <String, dynamic>{};
	data['list'] = entity.list;
	data['next'] = entity.next;
	data['page'] = entity.page;
	data['pageSize'] = entity.pageSize;
	data['total'] = entity.total;
	data['totalPage'] = entity.totalPage;
	return data;
}
